3.50 \(\int \sin ^2(a+\frac {1}{4} i \log (c x^2)) \, dx\)

Optimal. Leaf size=53 \[ -\frac {e^{2 i a} x \log (x)}{4 \sqrt {c x^2}}-\frac {e^{-2 i a} c x^3}{8 \sqrt {c x^2}}+\frac {x}{2} \]

[Out]

1/2*x-1/8*c*x^3/exp(2*I*a)/(c*x^2)^(1/2)-1/4*exp(2*I*a)*x*ln(x)/(c*x^2)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {4483, 4489} \[ -\frac {e^{-2 i a} c x^3}{8 \sqrt {c x^2}}-\frac {e^{2 i a} x \log (x)}{4 \sqrt {c x^2}}+\frac {x}{2} \]

Antiderivative was successfully verified.

[In]

Int[Sin[a + (I/4)*Log[c*x^2]]^2,x]

[Out]

x/2 - (c*x^3)/(8*E^((2*I)*a)*Sqrt[c*x^2]) - (E^((2*I)*a)*x*Log[x])/(4*Sqrt[c*x^2])

Rule 4483

Int[Sin[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)]^(p_.), x_Symbol] :> Dist[x/(n*(c*x^n)^(1/n)), Subst[Int[x
^(1/n - 1)*Sin[d*(a + b*Log[x])]^p, x], x, c*x^n], x] /; FreeQ[{a, b, c, d, n, p}, x] && (NeQ[c, 1] || NeQ[n,
1])

Rule 4489

Int[((e_.)*(x_))^(m_.)*Sin[((a_.) + Log[x_]*(b_.))*(d_.)]^(p_.), x_Symbol] :> Dist[(m + 1)^p/(2^p*b^p*d^p*p^p)
, Int[ExpandIntegrand[(e*x)^m*(E^((a*b*d^2*p)/(m + 1))/x^((m + 1)/p) - x^((m + 1)/p)/E^((a*b*d^2*p)/(m + 1)))^
p, x], x], x] /; FreeQ[{a, b, d, e, m}, x] && IGtQ[p, 0] && EqQ[b^2*d^2*p^2 + (m + 1)^2, 0]

Rubi steps

\begin {align*} \int \sin ^2\left (a+\frac {1}{4} i \log \left (c x^2\right )\right ) \, dx &=\frac {x \operatorname {Subst}\left (\int \frac {\sin ^2\left (a+\frac {1}{4} i \log (x)\right )}{\sqrt {x}} \, dx,x,c x^2\right )}{2 \sqrt {c x^2}}\\ &=-\frac {x \operatorname {Subst}\left (\int \left (e^{-2 i a}+\frac {e^{2 i a}}{x}-\frac {2}{\sqrt {x}}\right ) \, dx,x,c x^2\right )}{8 \sqrt {c x^2}}\\ &=\frac {x}{2}-\frac {c e^{-2 i a} x^3}{8 \sqrt {c x^2}}-\frac {e^{2 i a} x \log (x)}{4 \sqrt {c x^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 60, normalized size = 1.13 \[ \frac {x \left (i \sin (2 a) \left (c x^2-2 \log (x)\right )-\cos (2 a) \left (c x^2+2 \log (x)\right )+4 \sqrt {c x^2}\right )}{8 \sqrt {c x^2}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + (I/4)*Log[c*x^2]]^2,x]

[Out]

(x*(4*Sqrt[c*x^2] - Cos[2*a]*(c*x^2 + 2*Log[x]) + I*(c*x^2 - 2*Log[x])*Sin[2*a]))/(8*Sqrt[c*x^2])

________________________________________________________________________________________

fricas [B]  time = 0.83, size = 145, normalized size = 2.74 \[ \frac {{\left (4 \, x^{2} e^{\left (2 i \, a\right )} - \frac {x e^{\left (4 i \, a\right )} \log \left (\frac {{\left (\sqrt {c x^{2}} {\left (x^{2} + 1\right )} e^{\left (2 i \, a\right )} + \frac {{\left (c x^{3} - c x\right )} e^{\left (2 i \, a\right )}}{\sqrt {c}}\right )} e^{\left (-2 i \, a\right )}}{8 \, x^{2}}\right )}{\sqrt {c}} + \frac {x e^{\left (4 i \, a\right )} \log \left (\frac {{\left (\sqrt {c x^{2}} {\left (x^{2} + 1\right )} e^{\left (2 i \, a\right )} - \frac {{\left (c x^{3} - c x\right )} e^{\left (2 i \, a\right )}}{\sqrt {c}}\right )} e^{\left (-2 i \, a\right )}}{8 \, x^{2}}\right )}{\sqrt {c}} - \sqrt {c x^{2}} {\left (x^{2} - 1\right )}\right )} e^{\left (-2 i \, a\right )}}{8 \, x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+1/4*I*log(c*x^2))^2,x, algorithm="fricas")

[Out]

1/8*(4*x^2*e^(2*I*a) - x*e^(4*I*a)*log(1/8*(sqrt(c*x^2)*(x^2 + 1)*e^(2*I*a) + (c*x^3 - c*x)*e^(2*I*a)/sqrt(c))
*e^(-2*I*a)/x^2)/sqrt(c) + x*e^(4*I*a)*log(1/8*(sqrt(c*x^2)*(x^2 + 1)*e^(2*I*a) - (c*x^3 - c*x)*e^(2*I*a)/sqrt
(c))*e^(-2*I*a)/x^2)/sqrt(c) - sqrt(c*x^2)*(x^2 - 1))*e^(-2*I*a)/x

________________________________________________________________________________________

giac [A]  time = 0.37, size = 32, normalized size = 0.60 \[ \frac {1}{2} \, x - \frac {c^{\frac {3}{2}} x^{2} e^{\left (-2 i \, a\right )} + 2 \, \sqrt {c} e^{\left (2 i \, a\right )} \log \relax (x)}{8 \, c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+1/4*I*log(c*x^2))^2,x, algorithm="giac")

[Out]

1/2*x - 1/8*(c^(3/2)*x^2*e^(-2*I*a) + 2*sqrt(c)*e^(2*I*a)*log(x))/c

________________________________________________________________________________________

maple [B]  time = 0.09, size = 173, normalized size = 3.26 \[ \frac {\frac {x}{4}+\frac {5 x \left (\tan ^{2}\left (\frac {a}{2}+\frac {i \ln \left (c \,x^{2}\right )}{8}\right )\right )}{2}+\frac {x \left (\tan ^{4}\left (\frac {a}{2}+\frac {i \ln \left (c \,x^{2}\right )}{8}\right )\right )}{4}-\frac {x \ln \left (c \,x^{2}\right )}{8}+\frac {3 x \ln \left (c \,x^{2}\right ) \left (\tan ^{2}\left (\frac {a}{2}+\frac {i \ln \left (c \,x^{2}\right )}{8}\right )\right )}{4}-\frac {x \ln \left (c \,x^{2}\right ) \left (\tan ^{4}\left (\frac {a}{2}+\frac {i \ln \left (c \,x^{2}\right )}{8}\right )\right )}{8}-\frac {i x \ln \left (c \,x^{2}\right ) \tan \left (\frac {a}{2}+\frac {i \ln \left (c \,x^{2}\right )}{8}\right )}{2}+\frac {i x \ln \left (c \,x^{2}\right ) \left (\tan ^{3}\left (\frac {a}{2}+\frac {i \ln \left (c \,x^{2}\right )}{8}\right )\right )}{2}}{\left (1+\tan ^{2}\left (\frac {a}{2}+\frac {i \ln \left (c \,x^{2}\right )}{8}\right )\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a+1/4*I*ln(c*x^2))^2,x)

[Out]

(1/4*x+5/2*x*tan(1/2*a+1/8*I*ln(c*x^2))^2+1/4*x*tan(1/2*a+1/8*I*ln(c*x^2))^4-1/8*x*ln(c*x^2)+3/4*x*ln(c*x^2)*t
an(1/2*a+1/8*I*ln(c*x^2))^2-1/8*x*ln(c*x^2)*tan(1/2*a+1/8*I*ln(c*x^2))^4-1/2*I*x*ln(c*x^2)*tan(1/2*a+1/8*I*ln(
c*x^2))+1/2*I*x*ln(c*x^2)*tan(1/2*a+1/8*I*ln(c*x^2))^3)/(1+tan(1/2*a+1/8*I*ln(c*x^2))^2)^2

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 48, normalized size = 0.91 \[ \frac {4 \, c x - {\left (c x^{2} {\left (\cos \left (2 \, a\right ) - i \, \sin \left (2 \, a\right )\right )} + {\left (2 \, \cos \left (2 \, a\right ) + 2 i \, \sin \left (2 \, a\right )\right )} \log \relax (x)\right )} \sqrt {c}}{8 \, c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+1/4*I*log(c*x^2))^2,x, algorithm="maxima")

[Out]

1/8*(4*c*x - (c*x^2*(cos(2*a) - I*sin(2*a)) + (2*cos(2*a) + 2*I*sin(2*a))*log(x))*sqrt(c))/c

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int {\sin \left (a+\frac {\ln \left (c\,x^2\right )\,1{}\mathrm {i}}{4}\right )}^2 \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + (log(c*x^2)*1i)/4)^2,x)

[Out]

int(sin(a + (log(c*x^2)*1i)/4)^2, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sin ^{2}{\left (a + \frac {i \log {\left (c x^{2} \right )}}{4} \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+1/4*I*ln(c*x**2))**2,x)

[Out]

Integral(sin(a + I*log(c*x**2)/4)**2, x)

________________________________________________________________________________________